
/**
 * 云闪付页面接口管理
 * @module yunshanfu
 */

import req from './index'
/**
 * 是否可以购买
 * @method canBuy
 * @param {token,type}
 * 
 */
const canBuy = (type, token) => {
    return req.get('user/api/v2/unionPay/canBuy', type, { token: token })
}

/**
 * 购买
 * @method buy
 * @param {token,type}
 * 
 */

const buy = (type, token) => {
    return req.post(`user/api/v2/unionPay/buy?type=${type}`, null, { token: token })
}


export { canBuy, buy };